package io;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;

public class PrintStreamTest {

    public static void main(String[] args) throws IOException {
        FileOutputStream fileOutputStream = new FileOutputStream("test.txt");
        PrintStream printStream = new PrintStream(fileOutputStream);
        printStream.print("犹豫就会败北，果断就会白给\r\n");
        printStream.print(new FileInputStreamTest());
        printStream.close();
        fileOutputStream.close();
    }
}
